package com.xl.loop;

public class WhileDemo2 {
    public static void main(String[] args) {
        double peakHeight = 8848860; //山峰高度
        double paperThickness = 0.1; //纸张厚度
        int count = 0;
        while (paperThickness < peakHeight) {
            paperThickness = 2*paperThickness;
            count++;
        }
        System.out.println("纸张需折叠次数："+count);
    }
}
